import request from "@/utils/request"

// 获取验证token
export const getToken = () => {
  return request({
    url:'/qiniu/token',
    method: 'get'
  })
}

export const getDomain = () => {
  return request({
    url:'/qiniu/domain',
    method: 'get'
  })
}

export const delQiNiuAvatar = () => {
  return request({
    url:'/qiniu/avatar',
    method: 'delete'
  })
}

export const getAvatarUrl = () => {
  return request({
    url:'/qiniu/avatar-url',
    method:'get'
  })
}

export const checkPhoto = (orderId) => {
  return request({
    url:`/qiniu/check?orderId=${orderId}`,
    method: 'get'
  })
}

export const getPhotoList = (orderId) => {
  return request({
    url:`/qiniu/photo-list?orderId=${orderId}`,
    method: 'get'
  })
}

export const withdrawPhoto = (orderId) => {
  return request({
    url:`/qiniu/withdraw-photo?orderId=${orderId}`,
    method: 'delete'
  })
}
